﻿namespace KinonekoSoftware.CodariaDB.Documents.Templates
{
    /// <summary>
    /// <see cref="ClassInstanceTemplateGenerator"/> 类型表示一个班级设定的模板创建器。
    /// </summary>
    /// <remarks>
    /// <para>此模板包含的模组有：</para>
    /// <para>1. 基本信息（Basic_Custom）</para>
    /// <para>2. 设卡模组（Modules）</para>
    /// <para>3. 教师模组（Detail_School_Teacher）</para>
    /// <para>4. 学生模组（Detail_School_Student）</para>
    /// <para>5. 座位模组（Detail_School_SeatInfo）</para>
    /// <para>6. 小团体模组（Detail_School_GangInClass）</para>
    /// <para>7. 剧情模组（Story）</para>
    /// </remarks>
    public sealed class ClassInstanceTemplateGenerator : InstanceTemplateGenerator
    {
        protected override void OnInitializeDefinitions(ICollection<DataPartDefinition> collection)
        {
            Define(collection, DataPartType.Basic_Custom, 0);
            Define(collection, DataPartType.Modules, 1);
            Define(collection, DataPartType.Detail_School_Teacher, 2);
            Define(collection, DataPartType.Detail_School_Student, 3);
            Define(collection, DataPartType.Detail_School_SeatInfo, 4);
            Define(collection, DataPartType.Detail_School_GangInClass, 5);
            Define(collection, DataPartType.Story, 6);
        }

        protected override void OnInitializeProperties(ICollection<CompositeItem> collection)
        {
            Property(collection, "别名", KnownMetadatas.Alias, false);
            Property(collection, "教室位置", null);
            Paragraph(collection, "简介", KnownMetadatas.Intro);
        }

        public override InstanceType TargetType => InstanceType.Others_Class;
    }
}